package top.yangbuyi.repertory.tyh.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import top.yangbuyi.repertory.tyh.mapper.ProductFileMapper;
import top.yangbuyi.repertory.tyh.domain.ProductFile;
import top.yangbuyi.repertory.tyh.service.ProductFileService;
@Service
public class ProductFileServiceImpl extends ServiceImpl<ProductFileMapper, ProductFile> implements ProductFileService{

      @Autowired
      private ProductFileMapper productFileMapper;

      /**
       * 获取安全库存配置单
       * */
      @Override
      public List<ProductFile> getProductFile() {
            QueryWrapper<ProductFile> queryWrapper=new QueryWrapper<>();
            queryWrapper.orderByDesc("id")
            .eq("check_tag","S001-2")
            .eq("design_cell_tag","K001-1");
            return productFileMapper.selectList(queryWrapper);
      }


      /**
       * 制定安全库存配置单（改变字段值 表示需要过审）
       */
      @Override
      public void updMakeConfig(int id) {
            productFileMapper.updMakeConfig(id);
      }
}
